package com.hmall.api.fallback;

import com.hmall.api.client.OrderClient;
import org.springframework.cloud.openfeign.FallbackFactory;

public class OrderFallBackFactory implements FallbackFactory <OrderClient>{
    @Override
    public OrderClient create(Throwable cause) {
        return new OrderClient() {
            @Override
            public void markOrderPaySuccess(Long orderId) {
                throw new RuntimeException("更改订单状态失败");
            }
        };
    }
}
